import request from "@/utils/request";

/**
 * 获取分类列表
 * @param props
 * @returns {*}
 */
export const getCategoryList = props => {
  return request({
    url: "/mall/tenantSelect/categoryList",
    method: "post",
    data: props
  });
};
/**
 * 分页商品查询
 * @param props
 * @returns {*}
 */
export const getSelectPage = props => {
  return request({
    url: "/mall/tenantSelect/page",
    method: "post",
    data: props
  });
};
/**
 * 获取商品上架数量
 * @param props
 * @returns {*}
 */
export const getPublishNum = props => {
  return request({
    url: "/mall/tenantSelect/publishNum",
    method: "post",
    data: props
  });
};

/**
 * 根据id获取区域
 * @param props
 * @returns {*}
 */
export const getOperateAreaList = props => {
  return request({
    url: "/mall/admin/product/getOperateAreaList",
    method: "post",
    data: props
  });
};

/**
 * 添加预选商品
 * @param props
 * @returns {*}
 */
export const addTenantSelect = props => {
  return request({
    url: "/mall/tenantSelect/save",
    method: "post",
    data: props
  });
};

/**
 * 可选商品数量
 */
export const getNotSelectNum = props => {
  return request({
    url: "/mall/tenantSelect/getNotSelectNum",
    method: "post",
    data: props
  });
};
// =========================================================================================
/**
 * 预选商品分类查询 tree
 */
export const getPreCategoryList = props => {
  return request({
    url: "/mall/preSelect/categoryList",
    method: "post",
    data: props
  });
};

/**
 * 预选商品列表
 */
export const getPreSelectList = props => {
  return request({
    url: "/mall/preSelect/page",
    method: "post",
    data: props
  });
};
/**
 * 立即上架
 */
export const readyListing = props => {
  return request({
    url: "/mall/preSelect/readyListing",
    method: "post",
    data: props
  });
};
/**
 * 可选商品-查询属性列表
 */
export const queryStastsList = props => {
  return request({
    url: "/mall/tenantSelect/queryStastsList",
    method: "post",
    data: props
  });
};
/**
 * 预选商品-查询属性列表
 */
export const queryPreStastsList = props => {
  return request({
    url: "/mall/preSelect/queryStastsList",
    method: "post",
    data: props
  });
};


/**
 * 查询商品返佣详情
 */
export const productCommissionDetail = query => {
  return request({
    url: "/purchase/productCommission/detail",
    method: "get",
    params: query
  });
};

